﻿using System.Windows;
using Microsoft.Phone.Controls;

namespace AKalinovsky.MapTest
{
    public partial class MainPage : PhoneApplicationPage
    {
        // Constructor
        public MainPage()
        {
            InitializeComponent();
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            double dLon, dLat, dZoom, dAzimuth;
            if (double.TryParse(lon.Text, out dLon) &&
                double.TryParse(lat.Text, out dLat) &&
                double.TryParse(zoom.Text, out dZoom) &&
                double.TryParse(azimuth.Text, out dAzimuth))
            {
                map.Center = new Map.Geo.Position(dLon, dLat);
                map.Zoom = dZoom;
                map.Azimuth = dAzimuth;
            }
        }
    }
}